{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import numpy.linalg as npl\n",
    "import math\n",
    "import matplotlib.pyplot as plt\n",
    "from IPython.core.interactiveshell import InteractiveShell\n",
    "InteractiveShell.ast_node_interactivity = \"all\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 11.1 Left and Right Inverses "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-3, -4],\n",
       "       [ 4,  6],\n",
       "       [ 1,  1]])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "array([[-1.22222222, -1.11111111,  1.77777778],\n",
       "       [ 0.77777778,  0.88888889, -1.22222222]])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "array([[ 0. , -0.5,  3. ],\n",
       "       [ 0. ,  0.5, -2. ]])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "array([[ 1.0000000e+00,  0.0000000e+00],\n",
       "       [-4.4408921e-16,  1.0000000e+00]])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "array([[1., 0.],\n",
       "       [0., 1.]])"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A,B,C = np.array([[-3,-4],[4,6],[1,1]]), np.array([[-11,-10,16],[7,8,-11]])/9, np.array([[0,-1,6],[0,1,-4]])/2\n",
    "A\n",
    "B\n",
    "C\n",
    "np.matmul(B,A)\n",
    "np.matmul(C,A) #both matrix multiplications yield identity matrices."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 11.2 Inverse "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[-2.77555756e-17, -5.00000000e-01, -2.50000000e-01],\n",
       "       [-2.00000000e-01,  2.00000000e-01, -5.00000000e-02],\n",
       "       [ 2.00000000e-01,  3.00000000e-01,  5.00000000e-02]])"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "array([[1.00000000e+00, 0.00000000e+00, 0.00000000e+00],\n",
       "       [0.00000000e+00, 1.00000000e+00, 2.77555756e-17],\n",
       "       [0.00000000e+00, 5.55111512e-17, 1.00000000e+00]])"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "array([[ 1.00000000e+00,  1.11022302e-16, -1.38777878e-17],\n",
       "       [ 5.55111512e-17,  1.00000000e+00,  1.38777878e-17],\n",
       "       [ 0.00000000e+00, -2.22044605e-16,  1.00000000e+00]])"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A = np.array([[1,-2,3],[0,2,2],[-4,-4,-4]])\n",
    "B = npl.inv(A)\n",
    "B\n",
    "np.matmul(B,A)\n",
    "np.matmul(A,B)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 1,  0,  1],\n",
       "       [ 4, -3, -4],\n",
       "       [ 1, -1, -2]])"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "array([[ 2., -1.,  3.],\n",
       "       [ 4., -3.,  8.],\n",
       "       [-1.,  1., -3.]])"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "array([ 0.2, -0.3,  1.2])"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A = np.array([[1,0,1],[4,-3,-4],[1,-1,-2]])\n",
    "B = npl.inv(A)\n",
    "A\n",
    "B\n",
    "x = np.array([.2,-.3,1.2])\n",
    "rhs = (B[0,:] @ x) * A[:,0] + (B[1,:] @ x) * A[:,1] + (B[2,:] @ x) * A[:,2]\n",
    "rhs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([[ 0.40995001, -0.28893125, -0.92443828],\n",
       "       [ 1.0405369 , -1.06041488, -1.25014882],\n",
       "       [-0.38647239, -0.15842839,  0.20291179]])"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "array([[-0.20356372,  0.26568228,  0.48999984],\n",
       "       [ 0.        , -1.41881337,  0.50893146],\n",
       "       [-0.        , -0.        ,  0.20291179]])"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A = np.random.randn(3,3)\n",
    "npl.inv(A)\n",
    "Q,R = npl.qr(A)\n",
    "npl.inv(R)*Q.transpose()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 11.3 Solving Linear Equations"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2.70649516321034"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#back substitution\n",
    "def backsub(R,b):\n",
    "    n = len(b)\n",
    "    x = np.zeros(n)\n",
    "    for i in range(n-1,0,-1):\n",
    "        x[i] = (b[i] - R[i][i+1:n] @ x[i+1:n])/R[i][i]\n",
    "    return x\n",
    "\n",
    "R = np.triu(np.random.randn(4,4))\n",
    "b = np.random.rand(4)\n",
    "x = backsub(R,b)\n",
    "\n",
    "npl.norm(np.matmul(R,x-b))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [],
   "source": [
    "n = 5000\n",
    "A,b = np.random.randn(n,n), np.random.randn(n)\n",
    "x1 = npl.solve(A,b)\n",
    "x2 = np.matmul(npl.inv(A),b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1.06 s ± 107 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n",
      "3.55 s ± 240 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "array([ 1.61191248, -0.19958196, -1.86676843, ..., -0.64018591,\n",
       "       -1.12641067,  0.55493818])"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "array([ 1.61191248, -0.19958196, -1.86676843, ..., -0.64018591,\n",
       "       -1.12641067,  0.55493818])"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "4.65218741493815e-10"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "3.7880606478212663e-10"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%timeit npl.solve(A,b) #x1\n",
    "%timeit np.matmul(npl.inv(A),b) #x2\n",
    "\n",
    "x1\n",
    "x2\n",
    "npl.norm(b-np.matmul(A,x1))\n",
    "npl.norm(b-np.matmul(A,x2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1.04 s ± 85.6 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n",
      "7.42 s ± 300 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n"
     ]
    }
   ],
   "source": [
    "n=5000\n",
    "A,b = np.random.randn(n,n), np.random.randn(n)\n",
    "%timeit npl.solve(A,b)\n",
    "\n",
    "n=10000\n",
    "A,b = np.random.randn(n,n), np.random.randn(n)\n",
    "%timeit npl.solve(A,b)\n",
    "\n",
    "#shows n^2 complexity"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1.11 s ± 116 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n",
      "1.13 s ± 108 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n",
      "2.3 s ± 227 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n",
      "1.08 s ± 100 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)\n"
     ]
    }
   ],
   "source": [
    "n = 5000\n",
    "A,B = np.random.randn(n,n), np.random.randn(n,2)\n",
    "%timeit npl.solve(A,B[:,0]) #two different RHS's\n",
    "%timeit npl.solve(A,B[:,1])\n",
    "%timeit [npl.solve(A,B[:,0]), npl.solve(A,B[:,1])] #naive solving takes twice as long as an individual solve\n",
    "%timeit npl.solve(A,B) #factor solve takes roughly same time as one RHS"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 11.4 Examples "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "metadata": {},
   "outputs": [],
   "source": [
    "t = np.array([-1.1,-.4,.2,.8])\n",
    "A = list(reversed(np.flip(np.vander(t,4)))) #vander constructed differently in numpy than in Julia\n",
    "b1 = np.array([-1.,1.3,1.,.5])\n",
    "c1 = npl.solve(A,b1)\n",
    "b2 = np.array([1.,0.,-2.,0])\n",
    "c2 = npl.solve(A,b2)\n",
    "ts = np.linspace(-1.2,1.2,1000)\n",
    "p1 = c1[0] + (c1[1]*ts) + (c1[2]*(ts**2))+ (c1[3]*(ts**3))\n",
    "p2 = c2[0] + (c2[1]*ts) + (c2[2]*(ts**2))+ (c2[3]*(ts**3))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-1.71682411, -1.69820591, -1.67965802, -1.66118032, -1.6427727 ,\n",
       "       -1.62443504, -1.60616723, -1.58796915, -1.56984069, -1.55178173,\n",
       "       -1.53379216, -1.51587185, -1.4980207 , -1.4802386 , -1.46252541,\n",
       "       -1.44488104, -1.42730536, -1.40979826, -1.39235962, -1.37498933,\n",
       "       -1.35768727, -1.34045333, -1.32328739, -1.30618934, -1.28915906,\n",
       "       -1.27219644, -1.25530135, -1.23847369, -1.22171334, -1.20502019,\n",
       "       -1.18839411, -1.171835  , -1.15534274, -1.13891721, -1.1225583 ,\n",
       "       -1.10626589, -1.09003986, -1.07388011, -1.05778652, -1.04175896,\n",
       "       -1.02579734, -1.00990152, -0.9940714 , -0.97830685, -0.96260777,\n",
       "       -0.94697404, -0.93140555, -0.91590217, -0.9004638 , -0.88509031,\n",
       "       -0.86978159, -0.85453753, -0.83935802, -0.82424293, -0.80919215,\n",
       "       -0.79420556, -0.77928306, -0.76442452, -0.74962983, -0.73489888,\n",
       "       -0.72023154, -0.70562771, -0.69108726, -0.67661009, -0.66219607,\n",
       "       -0.6478451 , -0.63355705, -0.61933182, -0.60516928, -0.59106932,\n",
       "       -0.57703183, -0.56305668, -0.54914378, -0.53529299, -0.5215042 ,\n",
       "       -0.50777731, -0.49411218, -0.48050872, -0.46696679, -0.4534863 ,\n",
       "       -0.44006711, -0.42670913, -0.41341222, -0.40017628, -0.38700119,\n",
       "       -0.37388684, -0.3608331 , -0.34783987, -0.33490703, -0.32203446,\n",
       "       -0.30922205, -0.29646969, -0.28377725, -0.27114462, -0.25857169,\n",
       "       -0.24605834, -0.23360446, -0.22120993, -0.20887464, -0.19659846,\n",
       "       -0.18438129, -0.17222302, -0.16012351, -0.14808266, -0.13610036,\n",
       "       -0.12417649, -0.11231092, -0.10050356, -0.08875428, -0.07706296,\n",
       "       -0.0654295 , -0.05385377, -0.04233566, -0.03087506, -0.01947185,\n",
       "       -0.00812591,  0.00316286,  0.0143946 ,  0.0255694 ,  0.03668739,\n",
       "        0.04774868,  0.0587534 ,  0.06970164,  0.08059353,  0.09142918,\n",
       "        0.10220872,  0.11293224,  0.12359988,  0.13421174,  0.14476794,\n",
       "        0.1552686 ,  0.16571383,  0.17610374,  0.18643846,  0.19671809,\n",
       "        0.20694275,  0.21711256,  0.22722764,  0.23728809,  0.24729404,\n",
       "        0.25724559,  0.26714287,  0.27698599,  0.28677506,  0.29651021,\n",
       "        0.30619154,  0.31581917,  0.32539322,  0.33491379,  0.34438102,\n",
       "        0.35379501,  0.36315587,  0.37246373,  0.3817187 ,  0.39092089,\n",
       "        0.40007042,  0.4091674 ,  0.41821196,  0.4272042 ,  0.43614424,\n",
       "        0.44503219,  0.45386818,  0.46265231,  0.47138471,  0.48006548,\n",
       "        0.48869474,  0.49727262,  0.50579921,  0.51427465,  0.52269904,\n",
       "        0.53107249,  0.53939514,  0.54766708,  0.55588843,  0.56405932,\n",
       "        0.57217986,  0.58025015,  0.58827032,  0.59624049,  0.60416076,\n",
       "        0.61203125,  0.61985209,  0.62762337,  0.63534523,  0.64301776,\n",
       "        0.6506411 ,  0.65821536,  0.66574064,  0.67321707,  0.68064476,\n",
       "        0.68802382,  0.69535438,  0.70263654,  0.70987043,  0.71705615,\n",
       "        0.72419383,  0.73128357,  0.7383255 ,  0.74531973,  0.75226637,\n",
       "        0.75916554,  0.76601736,  0.77282193,  0.77957939,  0.78628983,\n",
       "        0.79295338,  0.79957015,  0.80614026,  0.81266382,  0.81914095,\n",
       "        0.82557176,  0.83195637,  0.83829489,  0.84458745,  0.85083414,\n",
       "        0.8570351 ,  0.86319043,  0.86930026,  0.87536469,  0.88138384,\n",
       "        0.88735782,  0.89328676,  0.89917077,  0.90500995,  0.91080444,\n",
       "        0.91655434,  0.92225977,  0.92792084,  0.93353767,  0.93911038,\n",
       "        0.94463907,  0.95012388,  0.9555649 ,  0.96096226,  0.96631607,\n",
       "        0.97162644,  0.9768935 ,  0.98211736,  0.98729813,  0.99243592,\n",
       "        0.99753086,  1.00258306,  1.00759263,  1.0125597 ,  1.01748437,\n",
       "        1.02236675,  1.02720698,  1.03200515,  1.03676139,  1.04147581,\n",
       "        1.04614853,  1.05077966,  1.05536932,  1.05991762,  1.06442468,\n",
       "        1.06889062,  1.07331554,  1.07769957,  1.08204281,  1.0863454 ,\n",
       "        1.09060743,  1.09482903,  1.09901031,  1.10315138,  1.10725237,\n",
       "        1.11131338,  1.11533454,  1.11931595,  1.12325774,  1.12716002,\n",
       "        1.1310229 ,  1.1348465 ,  1.13863093,  1.14237632,  1.14608276,\n",
       "        1.14975039,  1.15337932,  1.15696966,  1.16052152,  1.16403502,\n",
       "        1.16751029,  1.17094742,  1.17434655,  1.17770777,  1.18103122,\n",
       "        1.184317  ,  1.18756523,  1.19077602,  1.19394949,  1.19708576,\n",
       "        1.20018494,  1.20324715,  1.20627249,  1.2092611 ,  1.21221307,\n",
       "        1.21512854,  1.2180076 ,  1.22085039,  1.22365701,  1.22642757,\n",
       "        1.2291622 ,  1.23186102,  1.23452412,  1.23715164,  1.23974368,\n",
       "        1.24230036,  1.2448218 ,  1.24730811,  1.24975941,  1.25217581,\n",
       "        1.25455743,  1.25690438,  1.25921677,  1.26149474,  1.26373838,\n",
       "        1.26594781,  1.26812316,  1.27026453,  1.27237204,  1.27444581,\n",
       "        1.27648595,  1.27849257,  1.2804658 ,  1.28240574,  1.28431252,\n",
       "        1.28618624,  1.28802703,  1.289835  ,  1.29161026,  1.29335292,\n",
       "        1.29506312,  1.29674095,  1.29838654,  1.3       ,  1.30158145,\n",
       "        1.30313099,  1.30464876,  1.30613485,  1.30758939,  1.3090125 ,\n",
       "        1.31040428,  1.31176486,  1.31309435,  1.31439285,  1.3156605 ,\n",
       "        1.31689741,  1.31810368,  1.31927944,  1.3204248 ,  1.32153988,\n",
       "        1.32262479,  1.32367964,  1.32470456,  1.32569965,  1.32666504,\n",
       "        1.32760084,  1.32850716,  1.32938411,  1.33023183,  1.33105041,\n",
       "        1.33183998,  1.33260064,  1.33333253,  1.33403574,  1.3347104 ,\n",
       "        1.33535662,  1.33597452,  1.33656421,  1.33712581,  1.33765944,\n",
       "        1.3381652 ,  1.33864321,  1.33909359,  1.33951646,  1.33991193,\n",
       "        1.34028011,  1.34062113,  1.34093509,  1.34122211,  1.3414823 ,\n",
       "        1.34171579,  1.34192269,  1.34210311,  1.34225717,  1.34238498,\n",
       "        1.34248665,  1.34256232,  1.34261208,  1.34263606,  1.34263436,\n",
       "        1.34260711,  1.34255443,  1.34247641,  1.34237319,  1.34224488,\n",
       "        1.34209159,  1.34191344,  1.34171054,  1.341483  ,  1.34123095,\n",
       "        1.3409545 ,  1.34065377,  1.34032886,  1.3399799 ,  1.33960699,\n",
       "        1.33921027,  1.33878983,  1.3383458 ,  1.3378783 ,  1.33738742,\n",
       "        1.33687331,  1.33633605,  1.33577579,  1.33519262,  1.33458666,\n",
       "        1.33395803,  1.33330685,  1.33263323,  1.33193728,  1.33121912,\n",
       "        1.33047887,  1.32971664,  1.32893254,  1.3281267 ,  1.32729922,\n",
       "        1.32645023,  1.32557984,  1.32468815,  1.3237753 ,  1.32284139,\n",
       "        1.32188654,  1.32091086,  1.31991448,  1.31889749,  1.31786003,\n",
       "        1.31680221,  1.31572413,  1.31462593,  1.3135077 ,  1.31236957,\n",
       "        1.31121166,  1.31003407,  1.30883693,  1.30762034,  1.30638443,\n",
       "        1.30512931,  1.30385509,  1.3025619 ,  1.30124983,  1.29991902,\n",
       "        1.29856958,  1.29720162,  1.29581525,  1.29441059,  1.29298777,\n",
       "        1.29154688,  1.29008806,  1.2886114 ,  1.28711704,  1.28560508,\n",
       "        1.28407564,  1.28252884,  1.28096478,  1.27938359,  1.27778538,\n",
       "        1.27617027,  1.27453837,  1.2728898 ,  1.27122467,  1.26954309,\n",
       "        1.26784519,  1.26613108,  1.26440087,  1.26265468,  1.26089263,\n",
       "        1.25911482,  1.25732138,  1.25551242,  1.25368806,  1.25184841,\n",
       "        1.24999358,  1.24812369,  1.24623887,  1.24433921,  1.24242485,\n",
       "        1.24049588,  1.23855244,  1.23659462,  1.23462256,  1.23263636,\n",
       "        1.23063615,  1.22862202,  1.22659411,  1.22455253,  1.22249738,\n",
       "        1.22042879,  1.21834688,  1.21625175,  1.21414352,  1.21202232,\n",
       "        1.20988824,  1.20774142,  1.20558195,  1.20340997,  1.20122558,\n",
       "        1.19902891,  1.19682005,  1.19459914,  1.19236629,  1.1901216 ,\n",
       "        1.18786521,  1.18559721,  1.18331774,  1.18102689,  1.1787248 ,\n",
       "        1.17641156,  1.17408731,  1.17175215,  1.1694062 ,  1.16704958,\n",
       "        1.16468239,  1.16230476,  1.15991681,  1.15751863,  1.15511037,\n",
       "        1.15269211,  1.15026399,  1.14782612,  1.14537861,  1.14292158,\n",
       "        1.14045514,  1.13797941,  1.13549451,  1.13300055,  1.13049764,\n",
       "        1.1279859 ,  1.12546545,  1.12293639,  1.12039886,  1.11785296,\n",
       "        1.1152988 ,  1.11273651,  1.11016619,  1.10758797,  1.10500196,\n",
       "        1.10240827,  1.09980702,  1.09719832,  1.0945823 ,  1.09195906,\n",
       "        1.08932872,  1.08669139,  1.0840472 ,  1.08139625,  1.07873867,\n",
       "        1.07607456,  1.07340405,  1.07072725,  1.06804426,  1.06535522,\n",
       "        1.06266023,  1.05995941,  1.05725288,  1.05454074,  1.05182312,\n",
       "        1.04910014,  1.04637189,  1.04363851,  1.04090011,  1.0381568 ,\n",
       "        1.0354087 ,  1.03265591,  1.02989857,  1.02713678,  1.02437066,\n",
       "        1.02160033,  1.01882589,  1.01604747,  1.01326518,  1.01047914,\n",
       "        1.00768945,  1.00489624,  1.00209963,  0.99929972,  0.99649663,\n",
       "        0.99369049,  0.99088139,  0.98806946,  0.98525482,  0.98243758,\n",
       "        0.97961785,  0.97679575,  0.97397139,  0.9711449 ,  0.96831638,\n",
       "        0.96548596,  0.96265374,  0.95981984,  0.95698438,  0.95414747,\n",
       "        0.95130923,  0.94846977,  0.94562921,  0.94278767,  0.93994525,\n",
       "        0.93710208,  0.93425827,  0.93141394,  0.92856919,  0.92572416,\n",
       "        0.92287894,  0.92003366,  0.91718843,  0.91434337,  0.91149859,\n",
       "        0.90865421,  0.90581035,  0.90296711,  0.90012462,  0.89728298,\n",
       "        0.89444233,  0.89160276,  0.8887644 ,  0.88592735,  0.88309175,\n",
       "        0.88025769,  0.87742531,  0.8745947 ,  0.871766  ,  0.8689393 ,\n",
       "        0.86611474,  0.86329241,  0.86047245,  0.85765496,  0.85484006,\n",
       "        0.85202787,  0.8492185 ,  0.84641206,  0.84360867,  0.84080845,\n",
       "        0.83801151,  0.83521797,  0.83242794,  0.82964154,  0.82685888,\n",
       "        0.82408009,  0.82130526,  0.81853452,  0.81576799,  0.81300578,\n",
       "        0.810248  ,  0.80749478,  0.80474622,  0.80200244,  0.79926356,\n",
       "        0.79652969,  0.79380095,  0.79107745,  0.7883593 ,  0.78564664,\n",
       "        0.78293956,  0.78023818,  0.77754262,  0.774853  ,  0.77216943,\n",
       "        0.76949202,  0.7668209 ,  0.76415617,  0.76149795,  0.75884636,\n",
       "        0.75620151,  0.75356352,  0.7509325 ,  0.74830857,  0.74569185,\n",
       "        0.74308244,  0.74048046,  0.73788604,  0.73529928,  0.7327203 ,\n",
       "        0.73014922,  0.72758615,  0.7250312 ,  0.7224845 ,  0.71994615,\n",
       "        0.71741628,  0.71489499,  0.7123824 ,  0.70987864,  0.70738381,\n",
       "        0.70489802,  0.70242141,  0.69995407,  0.69749612,  0.69504769,\n",
       "        0.69260888,  0.69017982,  0.68776061,  0.68535137,  0.68295222,\n",
       "        0.68056327,  0.67818464,  0.67581644,  0.6734588 ,  0.67111181,\n",
       "        0.66877561,  0.6664503 ,  0.664136  ,  0.66183282,  0.65954089,\n",
       "        0.65726031,  0.6549912 ,  0.65273368,  0.65048786,  0.64825386,\n",
       "        0.64603179,  0.64382177,  0.64162391,  0.63943834,  0.63726515,\n",
       "        0.63510448,  0.63295643,  0.63082112,  0.62869866,  0.62658918,\n",
       "        0.62449278,  0.62240959,  0.62033971,  0.61828326,  0.61624036,\n",
       "        0.61421113,  0.61219567,  0.61019411,  0.60820655,  0.60623312,\n",
       "        0.60427393,  0.60232909,  0.60039873,  0.59848295,  0.59658187,\n",
       "        0.5946956 ,  0.59282427,  0.59096799,  0.58912687,  0.58730102,\n",
       "        0.58549057,  0.58369563,  0.58191631,  0.58015273,  0.57840501,\n",
       "        0.57667325,  0.57495758,  0.57325811,  0.57157496,  0.56990824,\n",
       "        0.56825806,  0.56662455,  0.56500781,  0.56340797,  0.56182513,\n",
       "        0.56025942,  0.55871094,  0.55717982,  0.55566617,  0.55417011,\n",
       "        0.55269174,  0.55123119,  0.54978857,  0.548364  ,  0.54695758,\n",
       "        0.54556945,  0.5441997 ,  0.54284847,  0.54151586,  0.54020198,\n",
       "        0.53890696,  0.5376309 ,  0.53637394,  0.53513617,  0.53391771,\n",
       "        0.53271869,  0.53153921,  0.53037939,  0.52923935,  0.5281192 ,\n",
       "        0.52701906,  0.52593904,  0.52487925,  0.52383982,  0.52282086,\n",
       "        0.52182248,  0.5208448 ,  0.51988794,  0.518952  ,  0.51803711,\n",
       "        0.51714338,  0.51627093,  0.51541987,  0.51459031,  0.51378237,\n",
       "        0.51299618,  0.51223183,  0.51148945,  0.51076916,  0.51007106,\n",
       "        0.50939528,  0.50874193,  0.50811112,  0.50750297,  0.5069176 ,\n",
       "        0.50635512,  0.50581564,  0.50529929,  0.50480617,  0.5043364 ,\n",
       "        0.5038901 ,  0.50346739,  0.50306837,  0.50269316,  0.50234188,\n",
       "        0.50201465,  0.50171158,  0.50143278,  0.50117837,  0.50094847,\n",
       "        0.50074319,  0.50056264,  0.50040695,  0.50027622,  0.50017057,\n",
       "        0.50009012,  0.50003499,  0.50000528,  0.50000112,  0.50002261,\n",
       "        0.50006988,  0.50014304,  0.50024221,  0.50036749,  0.50051901,\n",
       "        0.50069688,  0.50090122,  0.50113214,  0.50138975,  0.50167418,\n",
       "        0.50198554,  0.50232394,  0.50268949,  0.50308232,  0.50350254,\n",
       "        0.50395027,  0.50442561,  0.50492869,  0.50545962,  0.50601852,\n",
       "        0.50660549,  0.50722067,  0.50786415,  0.50853606,  0.50923652,\n",
       "        0.50996563,  0.51072352,  0.51151029,  0.51232607,  0.51317097,\n",
       "        0.5140451 ,  0.51494858,  0.51588153,  0.51684405,  0.51783628,\n",
       "        0.51885831,  0.51991028,  0.52099228,  0.52210444,  0.52324687,\n",
       "        0.5244197 ,  0.52562302,  0.52685697,  0.52812164,  0.52941717,\n",
       "        0.53074366,  0.53210124,  0.53349001,  0.53491008,  0.53636159,\n",
       "        0.53784464,  0.53935934,  0.54090581,  0.54248418,  0.54409454,\n",
       "        0.54573703,  0.54741175,  0.54911881,  0.55085834,  0.55263046,\n",
       "        0.55443526,  0.55627288,  0.55814342,  0.560047  ,  0.56198374,\n",
       "        0.56395375,  0.56595715,  0.56799405,  0.57006457,  0.57216882,\n",
       "        0.57430692,  0.57647898,  0.57868512,  0.58092546,  0.58320011,\n",
       "        0.58550918,  0.58785279,  0.59023106,  0.5926441 ,  0.59509203,\n",
       "        0.59757495,  0.600093  ,  0.60264628,  0.6052349 ,  0.60785899,\n",
       "        0.61051866,  0.61321402,  0.61594519,  0.61871229,  0.62151542,\n",
       "        0.62435471,  0.62723027,  0.63014222,  0.63309067,  0.63607574,\n",
       "        0.63909753,  0.64215618,  0.64525179,  0.64838447,  0.65155435,\n",
       "        0.65476154,  0.65800615,  0.6612883 ,  0.66460811,  0.66796569,\n",
       "        0.67136115,  0.67479461,  0.67826619,  0.681776  ,  0.68532416,\n",
       "        0.68891078,  0.69253598,  0.69619987,  0.69990257,  0.70364419,\n",
       "        0.70742486,  0.71124467,  0.71510376,  0.71900223,  0.7229402 ,\n",
       "        0.72691779,  0.7309351 ,  0.73499227,  0.7390894 ,  0.7432266 ,\n",
       "        0.74740399,  0.7516217 ,  0.75587982,  0.76017849,  0.76451781,\n",
       "        0.7688979 ,  0.77331887,  0.77778084,  0.78228393,  0.78682825,\n",
       "        0.79141391,  0.79604104,  0.80070974,  0.80542013,  0.81017234,\n",
       "        0.81496646,  0.81980262,  0.82468094,  0.82960152,  0.83456449,\n",
       "        0.83956996,  0.84461804,  0.84970885,  0.85484251,  0.86001913,\n",
       "        0.86523882,  0.87050171,  0.8758079 ,  0.88115751,  0.88655067,\n",
       "        0.89198747,  0.89746805,  0.9029925 ,  0.90856096,  0.91417353,\n",
       "        0.91983033,  0.92553147,  0.93127708,  0.93706726,  0.94290213])"
      ]
     },
     "execution_count": 120,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "array([ 6.11785875e-01,  6.23359869e-01,  6.34819155e-01,  6.46164040e-01,\n",
       "        6.57394832e-01,  6.68511839e-01,  6.79515367e-01,  6.90405724e-01,\n",
       "        7.01183218e-01,  7.11848156e-01,  7.22400845e-01,  7.32841593e-01,\n",
       "        7.43170707e-01,  7.53388495e-01,  7.63495264e-01,  7.73491321e-01,\n",
       "        7.83376974e-01,  7.93152530e-01,  8.02818297e-01,  8.12374582e-01,\n",
       "        8.21821692e-01,  8.31159935e-01,  8.40389619e-01,  8.49511050e-01,\n",
       "        8.58524536e-01,  8.67430385e-01,  8.76228904e-01,  8.84920400e-01,\n",
       "        8.93505181e-01,  9.01983554e-01,  9.10355826e-01,  9.18622306e-01,\n",
       "        9.26783300e-01,  9.34839115e-01,  9.42790060e-01,  9.50636442e-01,\n",
       "        9.58378567e-01,  9.66016744e-01,  9.73551280e-01,  9.80982482e-01,\n",
       "        9.88310658e-01,  9.95536115e-01,  1.00265916e+00,  1.00968010e+00,\n",
       "        1.01659925e+00,  1.02341690e+00,  1.03013337e+00,  1.03674897e+00,\n",
       "        1.04326401e+00,  1.04967878e+00,  1.05599360e+00,  1.06220877e+00,\n",
       "        1.06832461e+00,  1.07434142e+00,  1.08025950e+00,  1.08607917e+00,\n",
       "        1.09180074e+00,  1.09742450e+00,  1.10295077e+00,  1.10837985e+00,\n",
       "        1.11371206e+00,  1.11894769e+00,  1.12408706e+00,  1.12913048e+00,\n",
       "        1.13407825e+00,  1.13893067e+00,  1.14368806e+00,  1.14835073e+00,\n",
       "        1.15291898e+00,  1.15739311e+00,  1.16177345e+00,  1.16606028e+00,\n",
       "        1.17025393e+00,  1.17435469e+00,  1.17836288e+00,  1.18227880e+00,\n",
       "        1.18610277e+00,  1.18983508e+00,  1.19347605e+00,  1.19702598e+00,\n",
       "        1.20048517e+00,  1.20385395e+00,  1.20713261e+00,  1.21032147e+00,\n",
       "        1.21342082e+00,  1.21643098e+00,  1.21935226e+00,  1.22218496e+00,\n",
       "        1.22492938e+00,  1.22758585e+00,  1.23015465e+00,  1.23263611e+00,\n",
       "        1.23503053e+00,  1.23733822e+00,  1.23955948e+00,  1.24169462e+00,\n",
       "        1.24374395e+00,  1.24570777e+00,  1.24758640e+00,  1.24938014e+00,\n",
       "        1.25108930e+00,  1.25271418e+00,  1.25425510e+00,  1.25571235e+00,\n",
       "        1.25708626e+00,  1.25837712e+00,  1.25958524e+00,  1.26071093e+00,\n",
       "        1.26175450e+00,  1.26271626e+00,  1.26359651e+00,  1.26439556e+00,\n",
       "        1.26511371e+00,  1.26575128e+00,  1.26630857e+00,  1.26678590e+00,\n",
       "        1.26718355e+00,  1.26750186e+00,  1.26774111e+00,  1.26790162e+00,\n",
       "        1.26798370e+00,  1.26798766e+00,  1.26791379e+00,  1.26776242e+00,\n",
       "        1.26753384e+00,  1.26722836e+00,  1.26684630e+00,  1.26638795e+00,\n",
       "        1.26585363e+00,  1.26524364e+00,  1.26455829e+00,  1.26379789e+00,\n",
       "        1.26296275e+00,  1.26205317e+00,  1.26106946e+00,  1.26001193e+00,\n",
       "        1.25888088e+00,  1.25767662e+00,  1.25639947e+00,  1.25504972e+00,\n",
       "        1.25362769e+00,  1.25213368e+00,  1.25056799e+00,  1.24893095e+00,\n",
       "        1.24722285e+00,  1.24544400e+00,  1.24359471e+00,  1.24167529e+00,\n",
       "        1.23968604e+00,  1.23762727e+00,  1.23549929e+00,  1.23330241e+00,\n",
       "        1.23103693e+00,  1.22870317e+00,  1.22630142e+00,  1.22383199e+00,\n",
       "        1.22129520e+00,  1.21869135e+00,  1.21602075e+00,  1.21328371e+00,\n",
       "        1.21048053e+00,  1.20761151e+00,  1.20467698e+00,  1.20167723e+00,\n",
       "        1.19861257e+00,  1.19548332e+00,  1.19228977e+00,  1.18903223e+00,\n",
       "        1.18571102e+00,  1.18232644e+00,  1.17887879e+00,  1.17536839e+00,\n",
       "        1.17179554e+00,  1.16816055e+00,  1.16446373e+00,  1.16070538e+00,\n",
       "        1.15688581e+00,  1.15300534e+00,  1.14906425e+00,  1.14506288e+00,\n",
       "        1.14100151e+00,  1.13688046e+00,  1.13270004e+00,  1.12846055e+00,\n",
       "        1.12416230e+00,  1.11980560e+00,  1.11539075e+00,  1.11091807e+00,\n",
       "        1.10638786e+00,  1.10180043e+00,  1.09715608e+00,  1.09245512e+00,\n",
       "        1.08769787e+00,  1.08288462e+00,  1.07801569e+00,  1.07309138e+00,\n",
       "        1.06811200e+00,  1.06307785e+00,  1.05798925e+00,  1.05284651e+00,\n",
       "        1.04764992e+00,  1.04239980e+00,  1.03709645e+00,  1.03174019e+00,\n",
       "        1.02633131e+00,  1.02087013e+00,  1.01535695e+00,  1.00979209e+00,\n",
       "        1.00417584e+00,  9.98508522e-01,  9.92790436e-01,  9.87021890e-01,\n",
       "        9.81203192e-01,  9.75334651e-01,  9.69416572e-01,  9.63449264e-01,\n",
       "        9.57433034e-01,  9.51368189e-01,  9.45255037e-01,  9.39093885e-01,\n",
       "        9.32885041e-01,  9.26628812e-01,  9.20325505e-01,  9.13975428e-01,\n",
       "        9.07578888e-01,  9.01136193e-01,  8.94647650e-01,  8.88113566e-01,\n",
       "        8.81534250e-01,  8.74910007e-01,  8.68241146e-01,  8.61527974e-01,\n",
       "        8.54770799e-01,  8.47969928e-01,  8.41125668e-01,  8.34238327e-01,\n",
       "        8.27308212e-01,  8.20335630e-01,  8.13320890e-01,  8.06264298e-01,\n",
       "        7.99166161e-01,  7.92026788e-01,  7.84846485e-01,  7.77625561e-01,\n",
       "        7.70364322e-01,  7.63063076e-01,  7.55722130e-01,  7.48341791e-01,\n",
       "        7.40922368e-01,  7.33464168e-01,  7.25967497e-01,  7.18432663e-01,\n",
       "        7.10859974e-01,  7.03249738e-01,  6.95602261e-01,  6.87917850e-01,\n",
       "        6.80196815e-01,  6.72439461e-01,  6.64646096e-01,  6.56817028e-01,\n",
       "        6.48952563e-01,  6.41053011e-01,  6.33118677e-01,  6.25149869e-01,\n",
       "        6.17146895e-01,  6.09110062e-01,  6.01039677e-01,  5.92936049e-01,\n",
       "        5.84799483e-01,  5.76630288e-01,  5.68428772e-01,  5.60195241e-01,\n",
       "        5.51930003e-01,  5.43633365e-01,  5.35305635e-01,  5.26947120e-01,\n",
       "        5.18558128e-01,  5.10138966e-01,  5.01689941e-01,  4.93211361e-01,\n",
       "        4.84703533e-01,  4.76166765e-01,  4.67601363e-01,  4.59007637e-01,\n",
       "        4.50385892e-01,  4.41736436e-01,  4.33059577e-01,  4.24355622e-01,\n",
       "        4.15624879e-01,  4.06867655e-01,  3.98084257e-01,  3.89274992e-01,\n",
       "        3.80440169e-01,  3.71580094e-01,  3.62695076e-01,  3.53785421e-01,\n",
       "        3.44851436e-01,  3.35893430e-01,  3.26911709e-01,  3.17906581e-01,\n",
       "        3.08878354e-01,  2.99827335e-01,  2.90753831e-01,  2.81658149e-01,\n",
       "        2.72540598e-01,  2.63401484e-01,  2.54241115e-01,  2.45059798e-01,\n",
       "        2.35857841e-01,  2.26635551e-01,  2.17393236e-01,  2.08131202e-01,\n",
       "        1.98849758e-01,  1.89549211e-01,  1.80229868e-01,  1.70892037e-01,\n",
       "        1.61536024e-01,  1.52162138e-01,  1.42770686e-01,  1.33361975e-01,\n",
       "        1.23936312e-01,  1.14494006e-01,  1.05035363e-01,  9.55606913e-02,\n",
       "        8.60702976e-02,  7.65644896e-02,  6.70435747e-02,  5.75078603e-02,\n",
       "        4.79576539e-02,  3.83932628e-02,  2.88149944e-02,  1.92231563e-02,\n",
       "        9.61805564e-03,  8.32667268e-16, -9.63070325e-03, -1.92737467e-02,\n",
       "       -2.89288229e-02, -3.85956245e-02, -4.82738441e-02, -5.79631742e-02,\n",
       "       -6.76633075e-02, -7.73739365e-02, -8.70947538e-02, -9.68254520e-02,\n",
       "       -1.06565724e-01, -1.16315262e-01, -1.26073758e-01, -1.35840906e-01,\n",
       "       -1.45616398e-01, -1.55399926e-01, -1.65191183e-01, -1.74989862e-01,\n",
       "       -1.84795654e-01, -1.94608254e-01, -2.04427353e-01, -2.14252645e-01,\n",
       "       -2.24083820e-01, -2.33920573e-01, -2.43762596e-01, -2.53609581e-01,\n",
       "       -2.63461221e-01, -2.73317208e-01, -2.83177236e-01, -2.93040996e-01,\n",
       "       -3.02908182e-01, -3.12778485e-01, -3.22651599e-01, -3.32527216e-01,\n",
       "       -3.42405028e-01, -3.52284729e-01, -3.62166011e-01, -3.72048566e-01,\n",
       "       -3.81932087e-01, -3.91816267e-01, -4.01700798e-01, -4.11585372e-01,\n",
       "       -4.21469683e-01, -4.31353423e-01, -4.41236285e-01, -4.51117960e-01,\n",
       "       -4.60998142e-01, -4.70876524e-01, -4.80752798e-01, -4.90626656e-01,\n",
       "       -5.00497791e-01, -5.10365896e-01, -5.20230663e-01, -5.30091784e-01,\n",
       "       -5.39948954e-01, -5.49801863e-01, -5.59650205e-01, -5.69493672e-01,\n",
       "       -5.79331957e-01, -5.89164752e-01, -5.98991751e-01, -6.08812644e-01,\n",
       "       -6.18627126e-01, -6.28434889e-01, -6.38235625e-01, -6.48029027e-01,\n",
       "       -6.57814788e-01, -6.67592599e-01, -6.77362155e-01, -6.87123146e-01,\n",
       "       -6.96875267e-01, -7.06618208e-01, -7.16351664e-01, -7.26075327e-01,\n",
       "       -7.35788889e-01, -7.45492042e-01, -7.55184480e-01, -7.64865895e-01,\n",
       "       -7.74535980e-01, -7.84194426e-01, -7.93840928e-01, -8.03475177e-01,\n",
       "       -8.13096866e-01, -8.22705687e-01, -8.32301333e-01, -8.41883497e-01,\n",
       "       -8.51451872e-01, -8.61006149e-01, -8.70546022e-01, -8.80071183e-01,\n",
       "       -8.89581324e-01, -8.99076139e-01, -9.08555319e-01, -9.18018558e-01,\n",
       "       -9.27465548e-01, -9.36895982e-01, -9.46309552e-01, -9.55705950e-01,\n",
       "       -9.65084870e-01, -9.74446004e-01, -9.83789045e-01, -9.93113684e-01,\n",
       "       -1.00241962e+00, -1.01170653e+00, -1.02097412e+00, -1.03022209e+00,\n",
       "       -1.03945011e+00, -1.04865789e+00, -1.05784511e+00, -1.06701148e+00,\n",
       "       -1.07615668e+00, -1.08528040e+00, -1.09438234e+00, -1.10346219e+00,\n",
       "       -1.11251965e+00, -1.12155440e+00, -1.13056613e+00, -1.13955455e+00,\n",
       "       -1.14851934e+00, -1.15746020e+00, -1.16637682e+00, -1.17526888e+00,\n",
       "       -1.18413609e+00, -1.19297814e+00, -1.20179471e+00, -1.21058551e+00,\n",
       "       -1.21935022e+00, -1.22808853e+00, -1.23680015e+00, -1.24548475e+00,\n",
       "       -1.25414204e+00, -1.26277171e+00, -1.27137345e+00, -1.27994695e+00,\n",
       "       -1.28849190e+00, -1.29700800e+00, -1.30549494e+00, -1.31395242e+00,\n",
       "       -1.32238011e+00, -1.33077773e+00, -1.33914496e+00, -1.34748148e+00,\n",
       "       -1.35578701e+00, -1.36406122e+00, -1.37230381e+00, -1.38051448e+00,\n",
       "       -1.38869291e+00, -1.39683880e+00, -1.40495184e+00, -1.41303172e+00,\n",
       "       -1.42107814e+00, -1.42909079e+00, -1.43706936e+00, -1.44501354e+00,\n",
       "       -1.45292303e+00, -1.46079752e+00, -1.46863669e+00, -1.47644026e+00,\n",
       "       -1.48420790e+00, -1.49193931e+00, -1.49963418e+00, -1.50729221e+00,\n",
       "       -1.51491308e+00, -1.52249649e+00, -1.53004214e+00, -1.53754971e+00,\n",
       "       -1.54501890e+00, -1.55244939e+00, -1.55984090e+00, -1.56719309e+00,\n",
       "       -1.57450567e+00, -1.58177834e+00, -1.58901077e+00, -1.59620268e+00,\n",
       "       -1.60335374e+00, -1.61046365e+00, -1.61753210e+00, -1.62455879e+00,\n",
       "       -1.63154341e+00, -1.63848565e+00, -1.64538521e+00, -1.65224177e+00,\n",
       "       -1.65905502e+00, -1.66582468e+00, -1.67255041e+00, -1.67923192e+00,\n",
       "       -1.68586890e+00, -1.69246104e+00, -1.69900804e+00, -1.70550958e+00,\n",
       "       -1.71196537e+00, -1.71837508e+00, -1.72473842e+00, -1.73105508e+00,\n",
       "       -1.73732475e+00, -1.74354712e+00, -1.74972188e+00, -1.75584874e+00,\n",
       "       -1.76192737e+00, -1.76795747e+00, -1.77393875e+00, -1.77987088e+00,\n",
       "       -1.78575356e+00, -1.79158648e+00, -1.79736934e+00, -1.80310183e+00,\n",
       "       -1.80878363e+00, -1.81441446e+00, -1.81999399e+00, -1.82552191e+00,\n",
       "       -1.83099793e+00, -1.83642173e+00, -1.84179301e+00, -1.84711146e+00,\n",
       "       -1.85237677e+00, -1.85758864e+00, -1.86274675e+00, -1.86785080e+00,\n",
       "       -1.87290048e+00, -1.87789549e+00, -1.88283552e+00, -1.88772025e+00,\n",
       "       -1.89254939e+00, -1.89732262e+00, -1.90203964e+00, -1.90670014e+00,\n",
       "       -1.91130381e+00, -1.91585035e+00, -1.92033945e+00, -1.92477079e+00,\n",
       "       -1.92914409e+00, -1.93345901e+00, -1.93771527e+00, -1.94191254e+00,\n",
       "       -1.94605053e+00, -1.95012892e+00, -1.95414742e+00, -1.95810570e+00,\n",
       "       -1.96200347e+00, -1.96584042e+00, -1.96961623e+00, -1.97333061e+00,\n",
       "       -1.97698324e+00, -1.98057381e+00, -1.98410203e+00, -1.98756758e+00,\n",
       "       -1.99097015e+00, -1.99430944e+00, -1.99758514e+00, -2.00079694e+00,\n",
       "       -2.00394454e+00, -2.00702763e+00, -2.01004589e+00, -2.01299903e+00,\n",
       "       -2.01588673e+00, -2.01870869e+00, -2.02146460e+00, -2.02415416e+00,\n",
       "       -2.02677705e+00, -2.02933297e+00, -2.03182161e+00, -2.03424266e+00,\n",
       "       -2.03659582e+00, -2.03888077e+00, -2.04109722e+00, -2.04324485e+00,\n",
       "       -2.04532336e+00, -2.04733244e+00, -2.04927178e+00, -2.05114107e+00,\n",
       "       -2.05294001e+00, -2.05466829e+00, -2.05632560e+00, -2.05791164e+00,\n",
       "       -2.05942609e+00, -2.06086866e+00, -2.06223902e+00, -2.06353688e+00,\n",
       "       -2.06476193e+00, -2.06591386e+00, -2.06699236e+00, -2.06799712e+00,\n",
       "       -2.06892784e+00, -2.06978422e+00, -2.07056593e+00, -2.07127269e+00,\n",
       "       -2.07190417e+00, -2.07246007e+00, -2.07294008e+00, -2.07334390e+00,\n",
       "       -2.07367122e+00, -2.07392173e+00, -2.07409512e+00, -2.07419109e+00,\n",
       "       -2.07420933e+00, -2.07414953e+00, -2.07401139e+00, -2.07379459e+00,\n",
       "       -2.07349883e+00, -2.07312380e+00, -2.07266920e+00, -2.07213471e+00,\n",
       "       -2.07152003e+00, -2.07082486e+00, -2.07004888e+00, -2.06919179e+00,\n",
       "       -2.06825327e+00, -2.06723303e+00, -2.06613076e+00, -2.06494614e+00,\n",
       "       -2.06367887e+00, -2.06232865e+00, -2.06089516e+00, -2.05937810e+00,\n",
       "       -2.05777716e+00, -2.05609204e+00, -2.05432242e+00, -2.05246799e+00,\n",
       "       -2.05052846e+00, -2.04850351e+00, -2.04639284e+00, -2.04419614e+00,\n",
       "       -2.04191310e+00, -2.03954341e+00, -2.03708677e+00, -2.03454287e+00,\n",
       "       -2.03191140e+00, -2.02919206e+00, -2.02638453e+00, -2.02348851e+00,\n",
       "       -2.02050369e+00, -2.01742977e+00, -2.01426644e+00, -2.01101338e+00,\n",
       "       -2.00767030e+00, -2.00423688e+00, -2.00071282e+00, -1.99709781e+00,\n",
       "       -1.99339154e+00, -1.98959371e+00, -1.98570401e+00, -1.98172213e+00,\n",
       "       -1.97764776e+00, -1.97348059e+00, -1.96922033e+00, -1.96486665e+00,\n",
       "       -1.96041926e+00, -1.95587785e+00, -1.95124210e+00, -1.94651172e+00,\n",
       "       -1.94168639e+00, -1.93676580e+00, -1.93174966e+00, -1.92663764e+00,\n",
       "       -1.92142946e+00, -1.91612478e+00, -1.91072332e+00, -1.90522476e+00,\n",
       "       -1.89962879e+00, -1.89393511e+00, -1.88814341e+00, -1.88225339e+00,\n",
       "       -1.87626472e+00, -1.87017712e+00, -1.86399027e+00, -1.85770385e+00,\n",
       "       -1.85131758e+00, -1.84483113e+00, -1.83824420e+00, -1.83155649e+00,\n",
       "       -1.82476768e+00, -1.81787747e+00, -1.81088555e+00, -1.80379161e+00,\n",
       "       -1.79659535e+00, -1.78929646e+00, -1.78189463e+00, -1.77438955e+00,\n",
       "       -1.76678092e+00, -1.75906843e+00, -1.75125177e+00, -1.74333063e+00,\n",
       "       -1.73530471e+00, -1.72717370e+00, -1.71893730e+00, -1.71059518e+00,\n",
       "       -1.70214706e+00, -1.69359261e+00, -1.68493154e+00, -1.67616353e+00,\n",
       "       -1.66728827e+00, -1.65830547e+00, -1.64921481e+00, -1.64001599e+00,\n",
       "       -1.63070869e+00, -1.62129262e+00, -1.61176746e+00, -1.60213290e+00,\n",
       "       -1.59238864e+00, -1.58253437e+00, -1.57256979e+00, -1.56249458e+00,\n",
       "       -1.55230844e+00, -1.54201106e+00, -1.53160213e+00, -1.52108136e+00,\n",
       "       -1.51044842e+00, -1.49970301e+00, -1.48884482e+00, -1.47787355e+00,\n",
       "       -1.46678890e+00, -1.45559054e+00, -1.44427818e+00, -1.43285150e+00,\n",
       "       -1.42131021e+00, -1.40965398e+00, -1.39788252e+00, -1.38599552e+00,\n",
       "       -1.37399267e+00, -1.36187366e+00, -1.34963819e+00, -1.33728594e+00,\n",
       "       -1.32481662e+00, -1.31222990e+00, -1.29952550e+00, -1.28670309e+00,\n",
       "       -1.27376237e+00, -1.26070304e+00, -1.24752478e+00, -1.23422729e+00,\n",
       "       -1.22081026e+00, -1.20727338e+00, -1.19361635e+00, -1.17983886e+00,\n",
       "       -1.16594060e+00, -1.15192126e+00, -1.13778054e+00, -1.12351813e+00,\n",
       "       -1.10913373e+00, -1.09462701e+00, -1.07999769e+00, -1.06524544e+00,\n",
       "       -1.05036996e+00, -1.03537095e+00, -1.02024810e+00, -1.00500110e+00,\n",
       "       -9.89629636e-01, -9.74133411e-01, -9.58512113e-01, -9.42765435e-01,\n",
       "       -9.26893070e-01, -9.10894710e-01, -8.94770049e-01, -8.78518778e-01,\n",
       "       -8.62140590e-01, -8.45635178e-01, -8.29002234e-01, -8.12241452e-01,\n",
       "       -7.95352523e-01, -7.78335140e-01, -7.61188995e-01, -7.43913782e-01,\n",
       "       -7.26509193e-01, -7.08974921e-01, -6.91310657e-01, -6.73516096e-01,\n",
       "       -6.55590928e-01, -6.37534848e-01, -6.19347546e-01, -6.01028717e-01,\n",
       "       -5.82578053e-01, -5.63995245e-01, -5.45279988e-01, -5.26431973e-01,\n",
       "       -5.07450892e-01, -4.88336440e-01, -4.69088307e-01, -4.49706188e-01,\n",
       "       -4.30189773e-01, -4.10538757e-01, -3.90752831e-01, -3.70831688e-01,\n",
       "       -3.50775021e-01, -3.30582522e-01, -3.10253884e-01, -2.89788800e-01,\n",
       "       -2.69186961e-01, -2.48448061e-01, -2.27571793e-01, -2.06557848e-01,\n",
       "       -1.85405920e-01, -1.64115700e-01, -1.42686882e-01, -1.21119159e-01,\n",
       "       -9.94122220e-02, -7.75657645e-02, -5.55794790e-02, -3.34530580e-02,\n",
       "       -1.11861941e-02,  1.12214201e-02,  3.37700919e-02,  5.64601289e-02,\n",
       "        7.92918384e-02,  1.02265528e-01,  1.25381505e-01,  1.48640076e-01,\n",
       "        1.72041550e-01,  1.95586233e-01,  2.19274433e-01,  2.43106458e-01,\n",
       "        2.67082614e-01,  2.91203210e-01,  3.15468552e-01,  3.39878948e-01,\n",
       "        3.64434706e-01,  3.89136133e-01,  4.13983536e-01,  4.38977222e-01,\n",
       "        4.64117500e-01,  4.89404676e-01,  5.14839058e-01,  5.40420953e-01,\n",
       "        5.66150669e-01,  5.92028514e-01,  6.18054793e-01,  6.44229816e-01,\n",
       "        6.70553889e-01,  6.97027320e-01,  7.23650416e-01,  7.50423485e-01,\n",
       "        7.77346834e-01,  8.04420770e-01,  8.31645601e-01,  8.59021634e-01,\n",
       "        8.86549177e-01,  9.14228537e-01,  9.42060021e-01,  9.70043938e-01,\n",
       "        9.98180593e-01,  1.02647030e+00,  1.05491335e+00,  1.08351007e+00,\n",
       "        1.11226076e+00,  1.14116572e+00,  1.17022527e+00,  1.19943971e+00,\n",
       "        1.22880934e+00,  1.25833449e+00,  1.28801544e+00,  1.31785252e+00,\n",
       "        1.34784602e+00,  1.37799626e+00,  1.40830355e+00,  1.43876818e+00,\n",
       "        1.46939048e+00,  1.50017073e+00,  1.53110926e+00,  1.56220637e+00,\n",
       "        1.59346237e+00,  1.62487756e+00,  1.65645226e+00,  1.68818676e+00,\n",
       "        1.72008139e+00,  1.75213643e+00,  1.78435221e+00,  1.81672903e+00,\n",
       "        1.84926719e+00,  1.88196701e+00,  1.91482879e+00,  1.94785284e+00,\n",
       "        1.98103947e+00,  2.01438898e+00,  2.04790168e+00,  2.08157788e+00,\n",
       "        2.11541789e+00,  2.14942201e+00,  2.18359055e+00,  2.21792381e+00,\n",
       "        2.25242212e+00,  2.28708577e+00,  2.32191506e+00,  2.35691032e+00,\n",
       "        2.39207184e+00,  2.42739994e+00,  2.46289491e+00,  2.49855707e+00,\n",
       "        2.53438673e+00,  2.57038419e+00,  2.60654976e+00,  2.64288374e+00,\n",
       "        2.67938645e+00,  2.71605820e+00,  2.75289928e+00,  2.78991001e+00,\n",
       "        2.82709069e+00,  2.86444164e+00,  2.90196315e+00,  2.93965555e+00,\n",
       "        2.97751912e+00,  3.01555419e+00,  3.05376105e+00,  3.09214002e+00,\n",
       "        3.13069141e+00,  3.16941551e+00,  3.20831265e+00,  3.24738312e+00,\n",
       "        3.28662723e+00,  3.32604530e+00,  3.36563762e+00,  3.40540451e+00,\n",
       "        3.44534627e+00,  3.48546321e+00,  3.52575563e+00,  3.56622386e+00,\n",
       "        3.60686818e+00,  3.64768892e+00,  3.68868637e+00,  3.72986085e+00,\n",
       "        3.77121266e+00,  3.81274211e+00,  3.85444951e+00,  3.89633516e+00,\n",
       "        3.93839937e+00,  3.98064245e+00,  4.02306471e+00,  4.06566645e+00,\n",
       "        4.10844799e+00,  4.15140962e+00,  4.19455166e+00,  4.23787441e+00,\n",
       "        4.28137819e+00,  4.32506329e+00,  4.36893003e+00,  4.41297871e+00,\n",
       "        4.45720964e+00,  4.50162313e+00,  4.54621949e+00,  4.59099902e+00,\n",
       "        4.63596203e+00,  4.68110882e+00,  4.72643971e+00,  4.77195501e+00,\n",
       "        4.81765501e+00,  4.86354004e+00,  4.90961038e+00,  4.95586636e+00,\n",
       "        5.00230828e+00,  5.04893645e+00,  5.09575117e+00,  5.14275275e+00,\n",
       "        5.18994150e+00,  5.23731773e+00,  5.28488174e+00,  5.33263385e+00,\n",
       "        5.38057435e+00,  5.42870356e+00,  5.47702178e+00,  5.52552933e+00,\n",
       "        5.57422650e+00,  5.62311361e+00,  5.67219096e+00,  5.72145886e+00,\n",
       "        5.77091762e+00,  5.82056755e+00,  5.87040895e+00,  5.92044213e+00])"
      ]
     },
     "execution_count": 120,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x11cb3fc18>]"
      ]
     },
     "execution_count": 120,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x11cb3fd68>]"
      ]
     },
     "execution_count": 120,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD8CAYAAABjAo9vAAAABHNCSVQICAg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EiBBgHPKm1Hgs08PXH82MJ+H32NiVcCmQBqUA0piniaE46zidyvH20dN8DKdiLgX5HvE4DSmyqxVJKqVBMqL+itZ7vfbtUKdXH+/0+QJn3fSf8HCYDlyil9gDzMM0xjwIJSqlD8/AeuV+H99n7/XigsisLtkAxUKy1XuN9/SYm6J18nM8FCrTW5VprFzAfmISzj/MhJ3tcLT3egRTsXwKDvFfUwzAXYRbYXFOnKaUU8CywTWv98BHfWgAcujL+PUzb+6H3b/BeXZ8I1Bz6yBcotNb3aK3TtNaZmOO4VGt9HfApcKV3saP3+dDP4krv8gF1Jqe1PgAUKaUGe9+aBmzFwccZ0wQzUSkV5f09P7TPjj3ORzjZ4/oRcL5SKtH7Sed873sdY/dFh5O8QHEhsAPIB+61ux6L9mkK5iPXZmCj93Ehpm3xE2Cn97mHd3mF6R2UD3yF6XFg+350Yv/PBhZ6v+4PrAV2AW8A4d73I7yvd3m/39/uuju4r2OAHO+xfgdIdPpxBu4HtgO5wEtAuNOOMzAXcw3BhTnzvrkjxxW4ybvvu4BZnalJ7jwVQgiHCaSmGCGEEO0gwS6EEA4jwS6EEA4jwS6EEA4jwS6EEA4jwS6EEA4jwS6EEA4jwS6EEA7z/4SfEvtgpxSyAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "p1\n",
    "p2\n",
    "plt.plot(p1)\n",
    "plt.plot(p2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 118,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x11c98af98>"
      ]
     },
     "execution_count": 118,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x11c9932e8>"
      ]
     },
     "execution_count": 118,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png":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XVluRy4EvAtVX12kD70Od3jLUttL5zB1avBV7slvcAH+jqPBP4AG9/h7zktXX1XUz/IvQfD7RNYu5mt1xXn1fSDfgw/RR/A/g+sKdr3wg8OtDvQ8B36afzbQPtF9L/x3gA+APg9DHX907gCeCl7v6srr0H/N5Avy3AQeDnTnj8k8A++i9g/xn4G5OsDfhH3fjf7u4/OYm5W2BtvwEcA54buL13qeZt2DFE/7TStd3yO7p5ONDNy4UDj72te9x+4INL8O9gvtoe7/59HJ+n3fM9vxOu7w7g+a6ObwJ/Z+Cxv9XN6QHgNyddW7f+GeDOEx43kbmb7eY3gSWpUZ4CkqRGGQCS1CgDQJIaZQBIUqMMAElqlAEgSY0yACSpUQaAJDXq/wGRHK6EYpBhBgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(t,b1)\n",
    "plt.scatter(t,b2)\n",
    "#Julia plot rescales both plots and scatters into one plot"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 11.5 Pseudo-inverse"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 121,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "matrix([[-1.22222222, -1.11111111,  1.77777778],\n",
       "        [ 0.77777778,  0.88888889, -1.22222222]])"
      ]
     },
     "execution_count": 121,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "matrix([[-0.58834841, -0.45760432],\n",
       "        [ 0.78446454, -0.52297636],\n",
       "        [ 0.19611614,  0.7190925 ]])"
      ]
     },
     "execution_count": 121,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "matrix([[ 5.09901951,  7.256297  ],\n",
       "        [ 0.        , -0.58834841]])"
      ]
     },
     "execution_count": 121,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "text/plain": [
       "matrix([[-1.22222222, -1.11111111,  1.77777778],\n",
       "        [ 0.77777778,  0.88888889, -1.22222222]])"
      ]
     },
     "execution_count": 121,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A = np.matrix([[-3,-4],[4,6],[1,1]])\n",
    "npl.pinv(A)\n",
    "Q,R = npl.qr(A)\n",
    "Q\n",
    "R\n",
    "npl.solve(R,Q.transpose())"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
